package com.jeecms.common.util;

import java.util.Properties;

public class SystemUtil {

    /**
     * 检查操作系统类型
     *
     * @return '
     */
    public static  boolean isWin() {
        Properties prop = System.getProperties();
        String os = prop.getProperty("os.name");
        if (os == null) {
            return false;
        }
        return os.startsWith("win") || os.startsWith("Win");
    }

    /**
     * 检查操作系统类型
     *
     * @return '
     */
    public static boolean isOSLinux() {
        Properties prop = System.getProperties();
        String os = prop.getProperty("os.name");
        if (os == null) {
            return false;
        }
        return  os.toLowerCase().startsWith("linux");
    }
}
